diff --git a/c-deps/libroach/encoding.cc b/c-deps/libroach/encoding.cc index 1187dd6978a4..29e3c682e79f 100644 --- a/c-deps/libroach/encoding.cc +++ b/c-deps/libroach/encoding.cc @@ -276,7 +276,23 @@ WARN_UNUSED_RESULT bool IsInt(rocksdb::Slice* buf) { return false; } -WARN_UNUSED_RESULT bool DecodeTablePrefix(rocksdb::Slice* buf, uint64_t* tbl) { +WARN_UNUSED_RESULT bool StripTenantPrefix(rocksdb::Slice* buf) { + if (buf->size() == 0) { + return true; + } + // kTenantPrefix is guaranteed to be a single byte. + if ((*buf)[0] != kTenantPrefix[0]) { + return true; + } + buf->remove_prefix(1); + uint64_t tid; + return DecodeUvarint64(buf, &tid); +} + +WARN_UNUSED_RESULT bool DecodeTenantAndTablePrefix(rocksdb::Slice* buf, uint64_t* tbl) { + if (!StripTenantPrefix(buf)) { + return false; + } if (!IsInt(buf) || !DecodeUvarint64(buf, tbl)) { return false; } diff --git a/c-deps/libroach/encoding.h b/c-deps/libroach/encoding.h index ef89821d5778..a38fac36d84b 100644 --- a/c-deps/libroach/encoding.h +++ b/c-deps/libroach/encoding.h @@ -118,11 +118,13 @@ rocksdb::Slice KeyPrefix(const rocksdb::Slice& src); // if it is of type int. WARN_UNUSED_RESULT bool IsInt(rocksdb::Slice* buf); -// DecodeTablePrefix validates that the given key has a table prefix. On -// completion, buf holds the remainder of the key (with the prefix removed) and -// tbl stores the decoded descriptor ID of the table. -// -// TODO(nvanbenschoten): support tenant ID prefix. -WARN_UNUSED_RESULT bool DecodeTablePrefix(rocksdb::Slice* buf, uint64_t* tbl); +// StripTenantPrefix validates that the given key has a tenant prefix. On +// completion, buf holds the remainder of the key (with the prefix removed). +WARN_UNUSED_RESULT bool StripTenantPrefix(rocksdb::Slice* buf); + +// DecodeTenantAndTablePrefix validates that the given key has a tenant and +// table prefix. On completion, buf holds the remainder of the key (with the +// prefix removed) and tbl stores the decoded descriptor ID of the table. +WARN_UNUSED_RESULT bool DecodeTenantAndTablePrefix(rocksdb::Slice* buf, uint64_t* tbl); } // namespace cockroach diff --git a/c-deps/libroach/encoding_test.cc b/c-deps/libroach/encoding_test.cc index 11b2584d79ce..39d4b9f4582b 100644 --- a/c-deps/libroach/encoding_test.cc +++ b/c-deps/libroach/encoding_test.cc @@ -76,3 +76,35 @@ TEST(Libroach, Encoding) { EXPECT_EQ(*it, out); } } + +TEST(Libroach, DecodeTenantAndTablePrefix) { + // clang-format off + std::vector> cases{ + {{'\x89'}, 1LLU}, + {{'\xf6', '\xff'}, 255LLU}, + {{'\xf7', '\xff', '\xff'}, 65535LLU}, + {{'\xf8', '\xff', '\xff', '\xff'}, 16777215LLU}, + {{'\xf9', '\xff', '\xff', '\xff', '\xff'}, 4294967295LLU}, + {{'\xfa', '\xff', '\xff', '\xff', '\xff', '\xff'}, 1099511627775LLU}, + {{'\xfb', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'}, 281474976710655LLU}, + {{'\xfc', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'}, 72057594037927935LLU}, + {{'\xfd', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'}, 18446744073709551615LLU}, + {{'\xfe', '\x8d', '\x89'}, 1LLU}, + {{'\xfe', '\x8d', '\xf6', '\xff'}, 255LLU}, + {{'\xfe', '\x8d', '\xf7', '\xff', '\xff'}, 65535LLU}, + {{'\xfe', '\x8d', '\xf8', '\xff', '\xff', '\xff'}, 16777215LLU}, + {{'\xfe', '\x8d', '\xf9', '\xff', '\xff', '\xff', '\xff'}, 4294967295LLU}, + {{'\xfe', '\x8d', '\xfa', '\xff', '\xff', '\xff', '\xff', '\xff'}, 1099511627775LLU}, + {{'\xfe', '\x8d', '\xfb', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'}, 281474976710655LLU}, + {{'\xfe', '\x8d', '\xfc', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'}, 72057594037927935LLU}, + {{'\xfe', '\x8d', '\xfd', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'}, 18446744073709551615LLU}, + }; + // clang-format on + + for (auto it = cases.begin(); it != cases.end(); it++) { + rocksdb::Slice slice(it->first); + uint64_t tbl = 0; + EXPECT_TRUE(DecodeTenantAndTablePrefix(&slice, &tbl)); + EXPECT_EQ(it->second, tbl); + } +} diff --git a/c-deps/libroach/keys.h b/c-deps/libroach/keys.h index 863d40120abd..85fe7d9abf86 100644 --- a/c-deps/libroach/keys.h +++ b/c-deps/libroach/keys.h @@ -10,6 +10,7 @@ const rocksdb::Slice kLocalRangeIDPrefix("\x01\x69", 2); const rocksdb::Slice kLocalRangeIDReplicatedInfix("\x72", 1); const rocksdb::Slice kLocalRangeAppliedStateSuffix("\x72\x61\x73\x6b", 4); const rocksdb::Slice kMeta2KeyMax("\x03\xff\xff", 3); +const rocksdb::Slice kTenantPrefix("\xfe", 1); const rocksdb::Slice kMinKey("", 0); const rocksdb::Slice kMaxKey("\xff\xff", 2); diff --git a/c-deps/libroach/mvcc.h b/c-deps/libroach/mvcc.h index c7a326b90397..b766a0563b2a 100644 --- a/c-deps/libroach/mvcc.h +++ b/c-deps/libroach/mvcc.h @@ -407,6 +407,12 @@ template class mvccScanner { // sequence, read that value. const bool found = getFromIntentHistory(); if (found) { + if (target_bytes_ > 0 && kvs_->NumBytes() >= target_bytes_) { + max_keys_ = kvs_->Count(); + } + if (max_keys_ > 0 && kvs_->Count() == max_keys_) { + return false; + } return advanceKey(); } // 11. If no value in the intent history has a sequence number equal to diff --git a/c-deps/libroach/row_counter.cc b/c-deps/libroach/row_counter.cc index 1a0959c94a23..97b56232549a 100644 --- a/c-deps/libroach/row_counter.cc +++ b/c-deps/libroach/row_counter.cc @@ -17,40 +17,46 @@ using namespace cockroach; int RowCounter::GetRowPrefixLength(rocksdb::Slice* key) { size_t n = key->size(); - if (!IsInt(key)) { + // Strip tenant ID prefix to get a "SQL key" starting with a table ID. + rocksdb::Slice buf = rocksdb::Slice(*key); + if (!StripTenantPrefix(&buf)) { + return 0; + } + size_t sql_n = key->size(); + + if (!IsInt(&buf)) { // Not a table key, so the row prefix is the entire key. return n; } - // The column ID length is encoded as a varint and we take advantage of the - // fact that the column ID itself will be encoded in 0-9 bytes and thus the - // length of the column ID data will fit in a single byte. - rocksdb::Slice buf = rocksdb::Slice(*key); - buf.remove_prefix(n - 1); + // The column family ID length is encoded as a varint and we take advantage of + // the fact that the column family ID itself will be encoded in 0-9 bytes and + // thus the length of the column family ID data will fit in a single byte. + buf.remove_prefix(sql_n - 1); if (!IsInt(&buf)) { - // The last byte is not a valid column ID suffix. + // The last byte is not a valid column family ID suffix. return 0; } - uint64_t col_id_len; - if (!DecodeUvarint64(&buf, &col_id_len)) { + uint64_t col_fam_id_len; + if (!DecodeUvarint64(&buf, &col_fam_id_len)) { return 0; } - if (col_id_len > uint64_t(n - 1)) { - // The column ID length was impossible. colIDLen is the length of - // the encoded column ID suffix. We add 1 to account for the byte - // holding the length of the encoded column ID and if that total - // (colIDLen+1) is greater than the key suffix (n == len(buf)) - // then we bail. Note that we don't consider this an error because - // EnsureSafeSplitKey can be called on keys that look like table - // keys but which do not have a column ID length suffix (e.g - // by SystemConfig.ComputeSplitKey). + if (col_fam_id_len > uint64_t(sql_n - 1)) { + // The column family ID length was impossible. colFamIDLen is the length of + // the encoded column family ID suffix. We add 1 to account for the byte + // holding the length of the encoded column family ID and if that total + // (colFamIDLen+1) is greater than the key suffix (sqlN == len(sqlKey)) then + // we bail. Note that we don't consider this an error because + // EnsureSafeSplitKey can be called on keys that look like table keys but + // which do not have a column family ID length suffix (e.g by + // SystemConfig.ComputeSplitKey). return 0; } - return n - int(col_id_len) - 1; + return n - int(col_fam_id_len) - 1; } // EnsureSafeSplitKey transforms the SQL table key argumnet such that it is a @@ -95,7 +101,7 @@ bool RowCounter::Count(const rocksdb::Slice& key) { prev_key.assign(decoded_key.data(), decoded_key.size()); uint64_t tbl; - if (!DecodeTablePrefix(&decoded_key, &tbl)) { + if (!DecodeTenantAndTablePrefix(&decoded_key, &tbl)) { return false; } diff --git a/c-deps/libroach/row_counter.h b/c-deps/libroach/row_counter.h index 662f1c163116..48b71fa8b9d5 100644 --- a/c-deps/libroach/row_counter.h +++ b/c-deps/libroach/row_counter.h @@ -23,8 +23,6 @@ const int MaxReservedDescID = 49; // RowCounter counts how many distinct rows appear in the KVs that is is shown // via `Count`. Note: the `DataSize` field of the BulkOpSummary is *not* // populated by this and should be set separately. -// -// TODO(nvanbenschoten): support tenant ID prefix. struct RowCounter { RowCounter(cockroach::roachpb::BulkOpSummary* summary) : summary(summary) {} bool Count(const rocksdb::Slice& key); diff --git a/pkg/cli/cert.go b/pkg/cli/cert.go index 771385a8a153..e10b919f40ee 100644 --- a/pkg/cli/cert.go +++ b/pkg/cli/cert.go @@ -203,9 +203,6 @@ List certificates and keys found in the certificate directory. // runListCerts loads and lists all certs. func runListCerts(cmd *cobra.Command, args []string) error { - if err := security.SetCertPrincipalMap(certCtx.certPrincipalMap); err != nil { - return err - } cm, err := security.NewCertificateManager(baseCfg.SSLCertsDir) if err != nil { return errors.Wrap(err, "cannot load certificates") diff --git a/pkg/cli/context.go b/pkg/cli/context.go index 11777d846370..73c50b477acb 100644 --- a/pkg/cli/context.go +++ b/pkg/cli/context.go @@ -77,6 +77,7 @@ func initCLIDefaults() { cliCtx.cmdTimeout = 0 // no timeout cliCtx.clientConnHost = "" cliCtx.clientConnPort = base.DefaultPort + cliCtx.certPrincipalMap = nil cliCtx.sqlConnURL = "" cliCtx.sqlConnUser = "" cliCtx.sqlConnPasswd = "" @@ -175,8 +176,6 @@ func initCLIDefaults() { authCtx.validityPeriod = 1 * time.Hour - certCtx.certPrincipalMap = nil - initPreFlagsDefaults() // Clear the "Changed" state of all the registered command-line flags. @@ -219,6 +218,9 @@ type cliContext struct { // clientConnPort is the port name/number to use to connect to a server. clientConnPort string + // certPrincipalMap is the cert-principal:db-principal map. + certPrincipalMap []string + // for CLI commands that use the SQL interface, these parameters // determine how to connect to the server. sqlConnURL, sqlConnUser, sqlConnDBName string @@ -413,9 +415,3 @@ var demoCtx struct { insecure bool geoLibsDir string } - -// certCtx captures the command-line parameters of the `cert` command. -// Defaults set by InitCLIDefaults() above. -var certCtx struct { - certPrincipalMap []string -} diff --git a/pkg/cli/flags.go b/pkg/cli/flags.go index 1c50cf0dcdd5..c3011357d7f1 100644 --- a/pkg/cli/flags.go +++ b/pkg/cli/flags.go @@ -240,7 +240,9 @@ func init() { // Every command but start will inherit the following setting. AddPersistentPreRunE(cockroachCmd, func(cmd *cobra.Command, _ []string) error { - extraClientFlagInit() + if err := extraClientFlagInit(); err != nil { + return err + } return setDefaultStderrVerbosity(cmd, log.Severity_WARNING) }) @@ -441,12 +443,11 @@ func init() { f := cmd.Flags() // All certs commands need the certificate directory. StringFlag(f, &baseCfg.SSLCertsDir, cliflags.CertsDir, baseCfg.SSLCertsDir) + // All certs commands get the certificate principal map. + StringSlice(f, &cliCtx.certPrincipalMap, + cliflags.CertPrincipalMap, cliCtx.certPrincipalMap) } - // The list certs command needs the certificate principal map. - StringSlice(listCertsCmd.Flags(), &certCtx.certPrincipalMap, - cliflags.CertPrincipalMap, certCtx.certPrincipalMap) - for _, cmd := range []*cobra.Command{createCACertCmd, createClientCACertCmd} { f := cmd.Flags() // CA certificates have a longer expiration time. @@ -495,6 +496,9 @@ func init() { // Certificate flags. StringFlag(f, &baseCfg.SSLCertsDir, cliflags.CertsDir, baseCfg.SSLCertsDir) + // Certificate principal map. + StringSlice(f, &cliCtx.certPrincipalMap, + cliflags.CertPrincipalMap, cliCtx.certPrincipalMap) } // Auth commands. @@ -885,7 +889,10 @@ func extraServerFlagInit(cmd *cobra.Command) error { return nil } -func extraClientFlagInit() { +func extraClientFlagInit() error { + if err := security.SetCertPrincipalMap(cliCtx.certPrincipalMap); err != nil { + return err + } serverCfg.Addr = net.JoinHostPort(cliCtx.clientConnHost, cliCtx.clientConnPort) serverCfg.AdvertiseAddr = serverCfg.Addr serverCfg.SQLAddr = net.JoinHostPort(cliCtx.clientConnHost, cliCtx.clientConnPort) @@ -901,6 +908,7 @@ func extraClientFlagInit() { if sqlCtx.debugMode { sqlCtx.echo = true } + return nil } func setDefaultStderrVerbosity(cmd *cobra.Command, defaultSeverity log.Severity) error { diff --git a/pkg/cli/flags_test.go b/pkg/cli/flags_test.go index 1a0890940d2e..f2c0323586c7 100644 --- a/pkg/cli/flags_test.go +++ b/pkg/cli/flags_test.go @@ -799,7 +799,9 @@ func TestServerJoinSettings(t *testing.T) { t.Fatalf("Parse(%#v) got unexpected error: %v", td.args, err) } - extraClientFlagInit() + if err := extraClientFlagInit(); err != nil { + t.Fatal(err) + } var actual []string myHostname, _ := os.Hostname() @@ -861,7 +863,9 @@ func TestClientConnSettings(t *testing.T) { t.Fatalf("Parse(%#v) got unexpected error: %v", td.args, err) } - extraClientFlagInit() + if err := extraClientFlagInit(); err != nil { + t.Fatal(err) + } if td.expectedAddr != serverCfg.Addr { t.Errorf("%d. serverCfg.Addr expected '%s', but got '%s'. td.args was '%#v'.", i, td.expectedAddr, serverCfg.Addr, td.args) diff --git a/pkg/cli/interactive_tests/test_cert_advisory_validation.tcl b/pkg/cli/interactive_tests/test_cert_advisory_validation.tcl index de08050f2d35..3529d256a8b5 100644 --- a/pkg/cli/interactive_tests/test_cert_advisory_validation.tcl +++ b/pkg/cli/interactive_tests/test_cert_advisory_validation.tcl @@ -11,7 +11,8 @@ set prompt ":/# " eexpect $prompt # create some cert without an IP address in there. -set certs_dir "./my-safe-directory" +set db_dir "logs/db" +set certs_dir "logs/my-safe-directory" send "mkdir -p $certs_dir\r" eexpect $prompt @@ -21,7 +22,7 @@ send "$argv cert create-node localhost --certs-dir=$certs_dir --ca-key=$certs_di eexpect $prompt start_test "Check that the server reports a warning if attempting to advertise an IP address not in cert." -send "$argv start-single-node --certs-dir=$certs_dir --advertise-addr=127.0.0.1\r" +send "$argv start-single-node --store=$db_dir --certs-dir=$certs_dir --advertise-addr=127.0.0.1\r" eexpect "advertise address" eexpect "127.0.0.1" eexpect "not in node certificate" @@ -32,7 +33,7 @@ eexpect $prompt end_test start_test "Check that the server reports no warning if the avertise addr is in the cert." -send "$argv start-single-node --certs-dir=$certs_dir --advertise-addr=localhost\r" +send "$argv start-single-node --store=$db_dir --certs-dir=$certs_dir --advertise-addr=localhost\r" expect { "not in node certificate" { report "unexpected warning" @@ -51,13 +52,13 @@ send "COCKROACH_CERT_NODE_USER=foo.bar $argv cert create-node localhost --certs- eexpect $prompt start_test "Check that the server reports an error if the node cert does not contain a node principal." -send "$argv start-single-node --certs-dir=$certs_dir --advertise-addr=localhost\r" +send "$argv start-single-node --store=$db_dir --certs-dir=$certs_dir --advertise-addr=localhost\r" eexpect "cannot load certificates" expect $prompt end_test start_test "Check that the cert principal map can allow the use of non-standard cert principal." -send "$argv start-single-node --certs-dir=$certs_dir --cert-principal-map=foo.bar:node --advertise-addr=localhost\r" +send "$argv start-single-node --store=$db_dir --certs-dir=$certs_dir --cert-principal-map=foo.bar:node --advertise-addr=localhost\r" eexpect "node starting" interrupt eexpect "interrupted" @@ -65,7 +66,7 @@ expect $prompt end_test start_test "Check that the cert principal map can allow the use of a SAN principal." -send "$argv start-single-node --certs-dir=$certs_dir --cert-principal-map=localhost:node --advertise-addr=localhost\r" +send "$argv start-single-node --store=$db_dir --certs-dir=$certs_dir --cert-principal-map=localhost:node --advertise-addr=localhost\r" eexpect "node starting" interrupt eexpect "interrupted" @@ -77,3 +78,23 @@ send "$argv cert list --certs-dir=$certs_dir --cert-principal-map=foo.bar:node\r eexpect "Certificate directory:" expect $prompt end_test + +start_test "Check that 'cert create-client' can utilize cert principal map." +send "$argv cert create-client root.crdb.io --certs-dir=$certs_dir --ca-key=$certs_dir/ca.key --cert-principal-map=foo.bar:node\r" +eexpect $prompt +send "mv $certs_dir/client.root.crdb.io.crt $certs_dir/client.root.crt; mv $certs_dir/client.root.crdb.io.key $certs_dir/client.root.key\r" +eexpect $prompt +end_test + +start_test "Check that the client commands can use cert principal map." +system "$argv start-single-node --store=$db_dir --certs-dir=$certs_dir --cert-principal-map=foo.bar:node,root.crdb.io:root --advertise-addr=localhost --background >>expect-cmd.log 2>&1" +send "$argv sql --certs-dir=$certs_dir --cert-principal-map=foo.bar:node,root.crdb.io:root -e \"select 'hello'\"\r" +eexpect "hello" +expect $prompt +send "$argv node ls --certs-dir=$certs_dir --cert-principal-map=foo.bar:node,root.crdb.io:root\r" +eexpect "1 row" +expect $prompt +send "$argv quit --certs-dir=$certs_dir --cert-principal-map=foo.bar:node,root.crdb.io:root\r" +eexpect "ok" +expect $prompt +end_test diff --git a/pkg/keys/constants.go b/pkg/keys/constants.go index 005cc89026db..e76fdd201eb0 100644 --- a/pkg/keys/constants.go +++ b/pkg/keys/constants.go @@ -191,7 +191,8 @@ var ( // possible suggested compaction keys for a store. LocalStoreSuggestedCompactionsMax = LocalStoreSuggestedCompactionsMin.PrefixEnd() - // The global keyspace includes the meta{1,2}, system, and SQL keys. + // The global keyspace includes the meta{1,2}, system, system tenant SQL + // keys, and non-system tenant SQL keys. // 1. Meta keys // @@ -261,7 +262,7 @@ var ( // TimeseriesKeyMax is the maximum value for any timeseries data. TimeseriesKeyMax = TimeseriesPrefix.PrefixEnd() - // 3. SQL keys + // 3. System tenant SQL keys // // TODO(nvanbenschoten): Figure out what to do with all of these. At a // minimum, prefix them all with "System". @@ -287,8 +288,10 @@ var ( // UserTableDataMin is the start key of user structured data. UserTableDataMin = SystemSQLCodec.TablePrefix(MinUserDescID) - // tenantPrefix is the prefix for all non-system tenant keys. - tenantPrefix = roachpb.Key{tenantPrefixByte} + // 4. Non-system tenant SQL keys + // + // TenantPrefix is the prefix for all non-system tenant keys. + TenantPrefix = roachpb.Key{tenantPrefixByte} TenantTableDataMin = MakeTenantPrefix(roachpb.MinTenantID) TenantTableDataMax = MakeTenantPrefix(roachpb.MaxTenantID).PrefixEnd() ) diff --git a/pkg/keys/gen_cpp_keys.go b/pkg/keys/gen_cpp_keys.go index acfd098be99e..e2d2345faef7 100644 --- a/pkg/keys/gen_cpp_keys.go +++ b/pkg/keys/gen_cpp_keys.go @@ -69,6 +69,7 @@ namespace cockroach { genKey(keys.LocalRangeIDReplicatedInfix, "LocalRangeIDReplicatedInfix") genKey(keys.LocalRangeAppliedStateSuffix, "LocalRangeAppliedStateSuffix") genKey(keys.Meta2KeyMax, "Meta2KeyMax") + genKey(keys.TenantPrefix, "TenantPrefix") genKey(keys.MinKey, "MinKey") genKey(keys.MaxKey, "MaxKey") fmt.Fprintf(f, "\n") diff --git a/pkg/keys/keys.go b/pkg/keys/keys.go index 12a2be61d3d1..8451e868b6a4 100644 --- a/pkg/keys/keys.go +++ b/pkg/keys/keys.go @@ -689,44 +689,53 @@ func DecodeTableIDIndexID(key []byte) ([]byte, uint32, uint32, error) { // prefix of every key for the same row. (Any key with this maximal prefix is // also guaranteed to be part of the input key's row.) // For secondary index keys, the row prefix is defined as the entire key. -// -// TODO(nvanbenschoten): support tenant ID prefix. func GetRowPrefixLength(key roachpb.Key) (int, error) { n := len(key) - if encoding.PeekType(key) != encoding.Int { + + // Strip tenant ID prefix to get a "SQL key" starting with a table ID. + sqlKey, _, err := DecodeTenantPrefix(key) + if err != nil { + return 0, errors.Errorf("%s: not a valid table key", key) + } + sqlN := len(sqlKey) + + if encoding.PeekType(sqlKey) != encoding.Int { // Not a table key, so the row prefix is the entire key. return n, nil } - // The column ID length is encoded as a varint and we take advantage of the - // fact that the column ID itself will be encoded in 0-9 bytes and thus the - // length of the column ID data will fit in a single byte. - buf := key[n-1:] - if encoding.PeekType(buf) != encoding.Int { - // The last byte is not a valid column ID suffix. + // The column family ID length is encoded as a varint and we take advantage + // of the fact that the column family ID itself will be encoded in 0-9 bytes + // and thus the length of the column family ID data will fit in a single + // byte. + colFamIDLenByte := sqlKey[sqlN-1:] + if encoding.PeekType(colFamIDLenByte) != encoding.Int { + // The last byte is not a valid column family ID suffix. return 0, errors.Errorf("%s: not a valid table key", key) } - // Strip off the family ID / column ID suffix from the buf. The last byte of the buf - // contains the length of the column ID suffix (which might be 0 if the buf - // does not contain a column ID suffix). - _, colIDLen, err := encoding.DecodeUvarintAscending(buf) + // Strip off the column family ID suffix from the buf. The last byte of the + // buf contains the length of the column family ID suffix, which might be 0 + // if the buf does not contain a column ID suffix or if the column family is + // 0 (see the optimization in MakeFamilyKey). + _, colFamIDLen, err := encoding.DecodeUvarintAscending(colFamIDLenByte) if err != nil { return 0, err } - // Note how this next comparison (and by extension the code after it) is overflow-safe. There - // are more intuitive ways of writing this that aren't as safe. See #18628. - if colIDLen > uint64(n-1) { - // The column ID length was impossible. colIDLen is the length of - // the encoded column ID suffix. We add 1 to account for the byte - // holding the length of the encoded column ID and if that total - // (colIDLen+1) is greater than the key suffix (n == len(buf)) - // then we bail. Note that we don't consider this an error because - // EnsureSafeSplitKey can be called on keys that look like table - // keys but which do not have a column ID length suffix (e.g - // by SystemConfig.ComputeSplitKey). + // Note how this next comparison (and by extension the code after it) is + // overflow-safe. There are more intuitive ways of writing this that aren't + // as safe. See #18628. + if colFamIDLen > uint64(sqlN-1) { + // The column family ID length was impossible. colFamIDLen is the length + // of the encoded column family ID suffix. We add 1 to account for the + // byte holding the length of the encoded column family ID and if that + // total (colFamIDLen+1) is greater than the key suffix (sqlN == + // len(sqlKey)) then we bail. Note that we don't consider this an error + // because EnsureSafeSplitKey can be called on keys that look like table + // keys but which do not have a column family ID length suffix (e.g by + // SystemConfig.ComputeSplitKey). return 0, errors.Errorf("%s: malformed table key", key) } - return len(key) - int(colIDLen) - 1, nil + return n - int(colFamIDLen) - 1, nil } // EnsureSafeSplitKey transforms an SQL table key such that it is a valid split key diff --git a/pkg/keys/keys_test.go b/pkg/keys/keys_test.go index 77868e81c593..798c1a3ddd2c 100644 --- a/pkg/keys/keys_test.go +++ b/pkg/keys/keys_test.go @@ -526,26 +526,53 @@ func TestMakeFamilyKey(t *testing.T) { } func TestEnsureSafeSplitKey(t *testing.T) { - e := func(vals ...uint64) roachpb.Key { - var k roachpb.Key + tenSysCodec := SystemSQLCodec + ten5Codec := MakeSQLCodec(roachpb.MakeTenantID(5)) + encInt := encoding.EncodeUvarintAscending + encInts := func(c SQLCodec, vals ...uint64) roachpb.Key { + k := c.TenantPrefix() for _, v := range vals { - k = encoding.EncodeUvarintAscending(k, v) + k = encInt(k, v) } return k } + es := func(vals ...uint64) roachpb.Key { + return encInts(tenSysCodec, vals...) + } + e5 := func(vals ...uint64) roachpb.Key { + return encInts(ten5Codec, vals...) + } goodData := []struct { in roachpb.Key expected roachpb.Key }{ - {e(1, 2, 0), e(1, 2)}, // /Table/1/2/0 -> /Table/1/2 - {e(1, 2, 1), e(1)}, // /Table/1/2/1 -> /Table/1 - {e(1, 2, 2), e()}, // /Table/1/2/2 -> /Table - {e(1, 2, 3, 0), e(1, 2, 3)}, // /Table/1/2/3/0 -> /Table/1/2/3 - {e(1, 2, 3, 1), e(1, 2)}, // /Table/1/2/3/1 -> /Table/1/2 - {e(1, 2, 200, 2), e(1, 2)}, // /Table/1/2/200/2 -> /Table/1/2 - {e(1, 2, 3, 4, 1), e(1, 2, 3)}, // /Table/1/2/3/4/1 -> /Table/1/2/3 - // TODO(nvanbenschoten): add test cases for tenant keys. + {es(), es()}, // Not a table key + {es(1, 2, 0), es(1, 2)}, // /Table/1/2/0 -> /Table/1/2 + {es(1, 2, 1), es(1)}, // /Table/1/2/1 -> /Table/1 + {es(1, 2, 2), es()}, // /Table/1/2/2 -> /Table + {es(1, 2, 3, 0), es(1, 2, 3)}, // /Table/1/2/3/0 -> /Table/1/2/3 + {es(1, 2, 3, 1), es(1, 2)}, // /Table/1/2/3/1 -> /Table/1/2 + {es(1, 2, 200, 2), es(1, 2)}, // /Table/1/2/200/2 -> /Table/1/2 + {es(1, 2, 3, 4, 1), es(1, 2, 3)}, // /Table/1/2/3/4/1 -> /Table/1/2/3 + // Same test cases, but for tenant 5. + {e5(), e5()}, // Not a table key + {e5(1, 2, 0), e5(1, 2)}, // /Tenant/5/Table/1/2/0 -> /Tenant/5/Table/1/2 + {e5(1, 2, 1), e5(1)}, // /Tenant/5/Table/1/2/1 -> /Tenant/5/Table/1 + {e5(1, 2, 2), e5()}, // /Tenant/5/Table/1/2/2 -> /Tenant/5/Table + {e5(1, 2, 3, 0), e5(1, 2, 3)}, // /Tenant/5/Table/1/2/3/0 -> /Tenant/5/Table/1/2/3 + {e5(1, 2, 3, 1), e5(1, 2)}, // /Tenant/5/Table/1/2/3/1 -> /Tenant/5/Table/1/2 + {e5(1, 2, 200, 2), e5(1, 2)}, // /Tenant/5/Table/1/2/200/2 -> /Tenant/5/Table/1/2 + {e5(1, 2, 3, 4, 1), e5(1, 2, 3)}, // /Tenant/5/Table/1/2/3/4/1 -> /Tenant/5/Table/1/2/3 + // Test cases using SQL encoding functions. + {MakeFamilyKey(tenSysCodec.IndexPrefix(1, 2), 0), es(1, 2)}, // /Table/1/2/0 -> /Table/1/2 + {MakeFamilyKey(tenSysCodec.IndexPrefix(1, 2), 1), es(1, 2)}, // /Table/1/2/1 -> /Table/1/2 + {MakeFamilyKey(encInt(tenSysCodec.IndexPrefix(1, 2), 3), 0), es(1, 2, 3)}, // /Table/1/2/3/0 -> /Table/1/2/3 + {MakeFamilyKey(encInt(tenSysCodec.IndexPrefix(1, 2), 3), 1), es(1, 2, 3)}, // /Table/1/2/3/1 -> /Table/1/2/3 + {MakeFamilyKey(ten5Codec.IndexPrefix(1, 2), 0), e5(1, 2)}, // /Tenant/5/Table/1/2/0 -> /Table/1/2 + {MakeFamilyKey(ten5Codec.IndexPrefix(1, 2), 1), e5(1, 2)}, // /Tenant/5/Table/1/2/1 -> /Table/1/2 + {MakeFamilyKey(encInt(ten5Codec.IndexPrefix(1, 2), 3), 0), e5(1, 2, 3)}, // /Tenant/5/Table/1/2/3/0 -> /Table/1/2/3 + {MakeFamilyKey(encInt(ten5Codec.IndexPrefix(1, 2), 3), 1), e5(1, 2, 3)}, // /Tenant/5/Table/1/2/3/1 -> /Table/1/2/3 } for i, d := range goodData { out, err := EnsureSafeSplitKey(d.in) @@ -572,18 +599,24 @@ func TestEnsureSafeSplitKey(t *testing.T) { err string }{ // Column ID suffix size is too large. - {e(1), "malformed table key"}, - {e(1, 2), "malformed table key"}, + {es(1), "malformed table key"}, + {es(1, 2), "malformed table key"}, // The table ID is invalid. - {e(200)[:1], "insufficient bytes to decode uvarint value"}, + {es(200)[:1], "insufficient bytes to decode uvarint value"}, // The index ID is invalid. - {e(1, 200)[:2], "insufficient bytes to decode uvarint value"}, + {es(1, 200)[:2], "insufficient bytes to decode uvarint value"}, // The column ID suffix is invalid. - {e(1, 2, 200)[:3], "insufficient bytes to decode uvarint value"}, + {es(1, 2, 200)[:3], "insufficient bytes to decode uvarint value"}, // Exercises a former overflow bug. We decode a uint(18446744073709551610) which, if casted // to int carelessly, results in -6. - {encoding.EncodeVarintAscending(SystemSQLCodec.TablePrefix(999), 322434), "malformed table key"}, - // TODO(nvanbenschoten): add test cases for tenant keys. + {encoding.EncodeVarintAscending(tenSysCodec.TablePrefix(999), 322434), "malformed table key"}, + // Same test cases, but for tenant 5. + {e5(1), "malformed table key"}, + {e5(1, 2), "malformed table key"}, + {e5(200)[:3], "insufficient bytes to decode uvarint value"}, + {e5(1, 200)[:4], "insufficient bytes to decode uvarint value"}, + {e5(1, 2, 200)[:5], "insufficient bytes to decode uvarint value"}, + {encoding.EncodeVarintAscending(ten5Codec.TablePrefix(999), 322434), "malformed table key"}, } for i, d := range errorData { _, err := EnsureSafeSplitKey(d.in) diff --git a/pkg/keys/sql.go b/pkg/keys/sql.go index edfa0a0f4d44..a787a717a342 100644 --- a/pkg/keys/sql.go +++ b/pkg/keys/sql.go @@ -23,7 +23,7 @@ func MakeTenantPrefix(tenID roachpb.TenantID) roachpb.Key { if tenID == roachpb.SystemTenantID { return nil } - return encoding.EncodeUvarintAscending(tenantPrefix, tenID.ToUint64()) + return encoding.EncodeUvarintAscending(TenantPrefix, tenID.ToUint64()) } // DecodeTenantPrefix determines the tenant ID from the key prefix, returning diff --git a/pkg/sql/information_schema.go b/pkg/sql/information_schema.go index 4c0fee087744..04ed34225817 100644 --- a/pkg/sql/information_schema.go +++ b/pkg/sql/information_schema.go @@ -387,11 +387,11 @@ https://www.postgresql.org/docs/9.5/infoschema-columns.html`, collationName = tree.NewDString(locale) } return addRow( - dbNameStr, // table_catalog - scNameStr, // table_schema - tree.NewDString(table.Name), // table_name - tree.NewDString(column.Name), // column_name - tree.NewDInt(tree.DInt(column.ID)), // ordinal_position + dbNameStr, // table_catalog + scNameStr, // table_schema + tree.NewDString(table.Name), // table_name + tree.NewDString(column.Name), // column_name + tree.NewDInt(tree.DInt(column.GetLogicalColumnID())), // ordinal_position dStringPtrOrNull(column.DefaultExpr), // column_default yesOrNoDatum(column.Nullable), // is_nullable tree.NewDString(column.Type.InformationSchemaName()), // data_type diff --git a/pkg/sql/logictest/testdata/logic_test/pg_catalog b/pkg/sql/logictest/testdata/logic_test/pg_catalog index 6d1b48120740..9b402a7de9b3 100644 --- a/pkg/sql/logictest/testdata/logic_test/pg_catalog +++ b/pkg/sql/logictest/testdata/logic_test/pg_catalog @@ -2279,3 +2279,26 @@ indexname indexdef primary CREATE UNIQUE INDEX "primary" ON test.public.geospatial_table USING btree (id ASC) idxa CREATE INDEX idxa ON test.public.geospatial_table USING gin (a ASC) idxb CREATE INDEX idxb ON test.public.geospatial_table USING gin (b ASC) + +subtest regression_46799 +statement ok +create table t(x INT DEFAULT 1, y INT DEFAULT 1); + +query I +select adnum from pg_attrdef WHERE adrelid = 85 +---- +1 +2 +3 + +statement ok +alter table t drop column y; +alter table t add column y int default 1; + +# make sure after adding and dropping the same column, the adnum for the re-added column increases. +query I +select adnum from pg_attrdef WHERE adrelid = 85 +---- +1 +3 +4 diff --git a/pkg/sql/opt/norm/rules/scalar.opt b/pkg/sql/opt/norm/rules/scalar.opt index ad5e38003f0e..1d9f2edef4f3 100644 --- a/pkg/sql/opt/norm/rules/scalar.opt +++ b/pkg/sql/opt/norm/rules/scalar.opt @@ -90,6 +90,11 @@ $result ) +# EliminateExistsZeroRows converts an Exists subquery to False when it's known +# that the input produces zero rows. +[EliminateExistsZeroRows, Normalize] +(Exists $input:* & (HasZeroRows $input)) => (False) + # EliminateExistsProject discards a Project input to the Exists operator. The # Project operator never changes the row cardinality of its input, and row # cardinality is the only thing that Exists cares about, so Project is a no-op. diff --git a/pkg/sql/opt/norm/testdata/rules/join b/pkg/sql/opt/norm/testdata/rules/join index 9e1685bbd37e..7749f0201d4f 100644 --- a/pkg/sql/opt/norm/testdata/rules/join +++ b/pkg/sql/opt/norm/testdata/rules/join @@ -2165,7 +2165,7 @@ scan a # SimplifyZeroCardinalitySemiJoin # -------------------------------------------------- # TODO(justin): figure out if there's a good way to make this still apply. -norm disable=SimplifyZeroCardinalityGroup expect=SimplifyZeroCardinalitySemiJoin +norm disable=(SimplifyZeroCardinalityGroup,EliminateExistsZeroRows) expect=SimplifyZeroCardinalitySemiJoin SELECT * FROM a WHERE EXISTS(SELECT * FROM (VALUES (k)) OFFSET 1) ---- values @@ -2178,7 +2178,7 @@ values # EliminateAntiJoin # -------------------------------------------------- # TODO(justin): figure out if there's a good way to make this still apply. -norm disable=SimplifyZeroCardinalityGroup expect=EliminateAntiJoin +norm disable=(SimplifyZeroCardinalityGroup,EliminateExistsZeroRows) expect=EliminateAntiJoin SELECT * FROM a WHERE NOT EXISTS(SELECT * FROM (VALUES (k)) OFFSET 1) ---- scan a diff --git a/pkg/sql/opt/norm/testdata/rules/scalar b/pkg/sql/opt/norm/testdata/rules/scalar index 772d554e7247..7e729f43d138 100644 --- a/pkg/sql/opt/norm/testdata/rules/scalar +++ b/pkg/sql/opt/norm/testdata/rules/scalar @@ -249,6 +249,20 @@ values ├── fd: ()-->(1) └── (true IN (NULL, NULL, ('201.249.149.90/18' & '97a7:3650:3dd8:d4e9:35fe:6cfb:a714:1c17/61') << 'e22f:2067:2ed2:7b07:b167:206f:f17b:5b7d/82'),) +# -------------------------------------------------- +# EliminateExistsZeroRows +# -------------------------------------------------- + +norm expect=EliminateExistsZeroRows +SELECT EXISTS(SELECT * FROM (VALUES (1)) WHERE false) +---- +values + ├── columns: exists:2!null + ├── cardinality: [1 - 1] + ├── key: () + ├── fd: ()-->(2) + └── (false,) + # -------------------------------------------------- # EliminateExistsProject # -------------------------------------------------- @@ -524,21 +538,11 @@ anti-join (hash) norm expect-not=EliminateExistsLimit SELECT * FROM a a1 WHERE EXISTS(SELECT i FROM a a2 where a1.i = a2.i LIMIT 0) ---- -select - ├── columns: k:1!null i:2 f:3 s:4 j:5 arr:6 - ├── key: (1) - ├── fd: (1)-->(2-6) - ├── scan a1 - │ ├── columns: a1.k:1!null a1.i:2 a1.f:3 a1.s:4 a1.j:5 a1.arr:6 - │ ├── key: (1) - │ └── fd: (1)-->(2-6) - └── filters - └── exists [subquery] - └── values - ├── columns: a2.i:8!null - ├── cardinality: [0 - 0] - ├── key: () - └── fd: ()-->(8) +values + ├── columns: k:1!null i:2!null f:3!null s:4!null j:5!null arr:6!null + ├── cardinality: [0 - 0] + ├── key: () + └── fd: ()-->(1-6) # Don't eliminate a limit from a non-correlated subquery. norm expect-not=EliminateExistsLimit diff --git a/pkg/sql/pg_catalog.go b/pkg/sql/pg_catalog.go index 5e6e815152b1..48d00f8291d9 100644 --- a/pkg/sql/pg_catalog.go +++ b/pkg/sql/pg_catalog.go @@ -412,11 +412,11 @@ CREATE TABLE pg_catalog.pg_attrdef ( defSrc = tree.NewDString(ctx.String()) } return addRow( - h.ColumnOid(table.ID, column.ID), // oid - tableOid(table.ID), // adrelid - tree.NewDInt(tree.DInt(colNum)), // adnum - defSrc, // adbin - defSrc, // adsrc + h.ColumnOid(table.ID, column.ID), // oid + tableOid(table.ID), // adrelid + tree.NewDInt(tree.DInt(column.GetLogicalColumnID())), // adnum + defSrc, // adbin + defSrc, // adsrc ) }) }) @@ -502,7 +502,7 @@ CREATE TABLE pg_catalog.pg_attribute ( // Columns for table. if err := forEachColumnInTable(table, func(column *sqlbase.ColumnDescriptor) error { tableID := tableOid(table.ID) - return addColumn(column, tableID, column.ID) + return addColumn(column, tableID, column.GetLogicalColumnID()) }); err != nil { return err } @@ -512,7 +512,7 @@ CREATE TABLE pg_catalog.pg_attribute ( return forEachColumnInIndex(table, index, func(column *sqlbase.ColumnDescriptor) error { idxID := h.IndexOid(table.ID, index.ID) - return addColumn(column, idxID, column.ID) + return addColumn(column, idxID, column.GetLogicalColumnID()) }, ) }) diff --git a/pkg/sql/sqlbase/structured.go b/pkg/sql/sqlbase/structured.go index 9b4770773fd0..78c0e9d33640 100644 --- a/pkg/sql/sqlbase/structured.go +++ b/pkg/sql/sqlbase/structured.go @@ -4131,3 +4131,14 @@ func GenerateUniqueConstraintName(prefix string, nameExistsFunc func(name string } return name } + +// GetLogicalColumnID returns the LogicalColumnID of the ColumnDescriptor +// if the LogicalColumnID is set (non-zero). Returns the ID of the +// ColumnDescriptor if the LogicalColumnID is not set. +func (desc ColumnDescriptor) GetLogicalColumnID() ColumnID { + if desc.LogicalColumnID != 0 { + return desc.LogicalColumnID + } + + return desc.ID +} diff --git a/pkg/sql/sqlbase/structured.pb.go b/pkg/sql/sqlbase/structured.pb.go index 81410f403381..f7c8d9962e57 100644 --- a/pkg/sql/sqlbase/structured.pb.go +++ b/pkg/sql/sqlbase/structured.pb.go @@ -74,7 +74,7 @@ func (x *ConstraintValidity) UnmarshalJSON(data []byte) error { return nil } func (ConstraintValidity) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{0} } type ForeignKeyReference_Action int32 @@ -119,7 +119,7 @@ func (x *ForeignKeyReference_Action) UnmarshalJSON(data []byte) error { return nil } func (ForeignKeyReference_Action) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{0, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{0, 0} } // Match is the algorithm used to compare composite keys. @@ -159,7 +159,7 @@ func (x *ForeignKeyReference_Match) UnmarshalJSON(data []byte) error { return nil } func (ForeignKeyReference_Match) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{0, 1} + return fileDescriptor_structured_b4380afd7e608b0d, []int{0, 1} } // The direction of a column in the index. @@ -196,7 +196,7 @@ func (x *IndexDescriptor_Direction) UnmarshalJSON(data []byte) error { return nil } func (IndexDescriptor_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{7, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{7, 0} } // The type of the index. @@ -233,7 +233,7 @@ func (x *IndexDescriptor_Type) UnmarshalJSON(data []byte) error { return nil } func (IndexDescriptor_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{7, 1} + return fileDescriptor_structured_b4380afd7e608b0d, []int{7, 1} } type ConstraintToUpdate_ConstraintType int32 @@ -276,7 +276,7 @@ func (x *ConstraintToUpdate_ConstraintType) UnmarshalJSON(data []byte) error { return nil } func (ConstraintToUpdate_ConstraintType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{8, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{8, 0} } // A descriptor within a mutation is unavailable for reads, writes @@ -341,7 +341,7 @@ func (x *DescriptorMutation_State) UnmarshalJSON(data []byte) error { return nil } func (DescriptorMutation_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{10, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{10, 0} } // Direction of mutation. @@ -384,7 +384,7 @@ func (x *DescriptorMutation_Direction) UnmarshalJSON(data []byte) error { return nil } func (DescriptorMutation_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{10, 1} + return fileDescriptor_structured_b4380afd7e608b0d, []int{10, 1} } // State is set if this TableDescriptor is in the process of being added or deleted. @@ -435,7 +435,7 @@ func (x *TableDescriptor_State) UnmarshalJSON(data []byte) error { return nil } func (TableDescriptor_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 0} } // AuditMode indicates which auditing actions to take when this table is used. @@ -472,7 +472,7 @@ func (x *TableDescriptor_AuditMode) UnmarshalJSON(data []byte) error { return nil } func (TableDescriptor_AuditMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 1} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 1} } type ForeignKeyReference struct { @@ -494,7 +494,7 @@ func (m *ForeignKeyReference) Reset() { *m = ForeignKeyReference{} } func (m *ForeignKeyReference) String() string { return proto.CompactTextString(m) } func (*ForeignKeyReference) ProtoMessage() {} func (*ForeignKeyReference) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{0} } func (m *ForeignKeyReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ func (m *ForeignKeyConstraint) Reset() { *m = ForeignKeyConstraint{} } func (m *ForeignKeyConstraint) String() string { return proto.CompactTextString(m) } func (*ForeignKeyConstraint) ProtoMessage() {} func (*ForeignKeyConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{1} + return fileDescriptor_structured_b4380afd7e608b0d, []int{1} } func (m *ForeignKeyConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -597,13 +597,20 @@ type ColumnDescriptor struct { // Expression to use to compute the value of this column if this is a // computed column. ComputeExpr *string `protobuf:"bytes,11,opt,name=compute_expr,json=computeExpr" json:"compute_expr,omitempty"` + // LogicalColumnID must be accessed through the accessor, since it is set + // lazily, it is incorrect to access it directly. + // LogicalColumnID represents a column's number in catalog tables. + // This only differs from ID when the Column order is swapped or + // the ColumnDescriptor must be remade while remaining visual ordering. + // This does not exist in TableDescriptors pre 20.2. + LogicalColumnID ColumnID `protobuf:"varint,13,opt,name=logical_id,json=logicalId,casttype=ColumnID" json:"logical_id"` } func (m *ColumnDescriptor) Reset() { *m = ColumnDescriptor{} } func (m *ColumnDescriptor) String() string { return proto.CompactTextString(m) } func (*ColumnDescriptor) ProtoMessage() {} func (*ColumnDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{2} + return fileDescriptor_structured_b4380afd7e608b0d, []int{2} } func (m *ColumnDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -659,7 +666,7 @@ func (m *ColumnFamilyDescriptor) Reset() { *m = ColumnFamilyDescriptor{} func (m *ColumnFamilyDescriptor) String() string { return proto.CompactTextString(m) } func (*ColumnFamilyDescriptor) ProtoMessage() {} func (*ColumnFamilyDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{3} + return fileDescriptor_structured_b4380afd7e608b0d, []int{3} } func (m *ColumnFamilyDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -705,7 +712,7 @@ func (m *InterleaveDescriptor) Reset() { *m = InterleaveDescriptor{} } func (m *InterleaveDescriptor) String() string { return proto.CompactTextString(m) } func (*InterleaveDescriptor) ProtoMessage() {} func (*InterleaveDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{4} + return fileDescriptor_structured_b4380afd7e608b0d, []int{4} } func (m *InterleaveDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -749,7 +756,7 @@ func (m *InterleaveDescriptor_Ancestor) Reset() { *m = InterleaveDescrip func (m *InterleaveDescriptor_Ancestor) String() string { return proto.CompactTextString(m) } func (*InterleaveDescriptor_Ancestor) ProtoMessage() {} func (*InterleaveDescriptor_Ancestor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{4, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{4, 0} } func (m *InterleaveDescriptor_Ancestor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -804,7 +811,7 @@ func (m *ShardedDescriptor) Reset() { *m = ShardedDescriptor{} } func (m *ShardedDescriptor) String() string { return proto.CompactTextString(m) } func (*ShardedDescriptor) ProtoMessage() {} func (*ShardedDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{5} + return fileDescriptor_structured_b4380afd7e608b0d, []int{5} } func (m *ShardedDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -849,7 +856,7 @@ func (m *PartitioningDescriptor) Reset() { *m = PartitioningDescriptor{} func (m *PartitioningDescriptor) String() string { return proto.CompactTextString(m) } func (*PartitioningDescriptor) ProtoMessage() {} func (*PartitioningDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{6} + return fileDescriptor_structured_b4380afd7e608b0d, []int{6} } func (m *PartitioningDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -892,7 +899,7 @@ func (m *PartitioningDescriptor_List) Reset() { *m = PartitioningDescrip func (m *PartitioningDescriptor_List) String() string { return proto.CompactTextString(m) } func (*PartitioningDescriptor_List) ProtoMessage() {} func (*PartitioningDescriptor_List) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{6, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{6, 0} } func (m *PartitioningDescriptor_List) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -937,7 +944,7 @@ func (m *PartitioningDescriptor_Range) Reset() { *m = PartitioningDescri func (m *PartitioningDescriptor_Range) String() string { return proto.CompactTextString(m) } func (*PartitioningDescriptor_Range) ProtoMessage() {} func (*PartitioningDescriptor_Range) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{6, 1} + return fileDescriptor_structured_b4380afd7e608b0d, []int{6, 1} } func (m *PartitioningDescriptor_Range) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1086,7 +1093,7 @@ func (m *IndexDescriptor) Reset() { *m = IndexDescriptor{} } func (m *IndexDescriptor) String() string { return proto.CompactTextString(m) } func (*IndexDescriptor) ProtoMessage() {} func (*IndexDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{7} + return fileDescriptor_structured_b4380afd7e608b0d, []int{7} } func (m *IndexDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1137,7 +1144,7 @@ func (m *ConstraintToUpdate) Reset() { *m = ConstraintToUpdate{} } func (m *ConstraintToUpdate) String() string { return proto.CompactTextString(m) } func (*ConstraintToUpdate) ProtoMessage() {} func (*ConstraintToUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{8} + return fileDescriptor_structured_b4380afd7e608b0d, []int{8} } func (m *ConstraintToUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1180,7 +1187,7 @@ func (m *PrimaryKeySwap) Reset() { *m = PrimaryKeySwap{} } func (m *PrimaryKeySwap) String() string { return proto.CompactTextString(m) } func (*PrimaryKeySwap) ProtoMessage() {} func (*PrimaryKeySwap) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{9} + return fileDescriptor_structured_b4380afd7e608b0d, []int{9} } func (m *PrimaryKeySwap) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1235,7 +1242,7 @@ func (m *DescriptorMutation) Reset() { *m = DescriptorMutation{} } func (m *DescriptorMutation) String() string { return proto.CompactTextString(m) } func (*DescriptorMutation) ProtoMessage() {} func (*DescriptorMutation) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{10} + return fileDescriptor_structured_b4380afd7e608b0d, []int{10} } func (m *DescriptorMutation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1584,7 +1591,7 @@ func (m *TableDescriptor) Reset() { *m = TableDescriptor{} } func (m *TableDescriptor) String() string { return proto.CompactTextString(m) } func (*TableDescriptor) ProtoMessage() {} func (*TableDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11} } func (m *TableDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1884,7 +1891,7 @@ func (m *TableDescriptor_SchemaChangeLease) Reset() { *m = TableDescript func (m *TableDescriptor_SchemaChangeLease) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_SchemaChangeLease) ProtoMessage() {} func (*TableDescriptor_SchemaChangeLease) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 0} } func (m *TableDescriptor_SchemaChangeLease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1925,7 +1932,7 @@ func (m *TableDescriptor_CheckConstraint) Reset() { *m = TableDescriptor func (m *TableDescriptor_CheckConstraint) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_CheckConstraint) ProtoMessage() {} func (*TableDescriptor_CheckConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 1} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 1} } func (m *TableDescriptor_CheckConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2031,7 +2038,7 @@ func (m *TableDescriptor_NameInfo) Reset() { *m = TableDescriptor_NameIn func (m *TableDescriptor_NameInfo) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_NameInfo) ProtoMessage() {} func (*TableDescriptor_NameInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 2} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 2} } func (m *TableDescriptor_NameInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2071,7 +2078,7 @@ func (m *TableDescriptor_Reference) Reset() { *m = TableDescriptor_Refer func (m *TableDescriptor_Reference) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_Reference) ProtoMessage() {} func (*TableDescriptor_Reference) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 3} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 3} } func (m *TableDescriptor_Reference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2108,7 +2115,7 @@ func (m *TableDescriptor_MutationJob) Reset() { *m = TableDescriptor_Mut func (m *TableDescriptor_MutationJob) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_MutationJob) ProtoMessage() {} func (*TableDescriptor_MutationJob) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 4} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 4} } func (m *TableDescriptor_MutationJob) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2151,7 +2158,7 @@ func (m *TableDescriptor_SequenceOpts) Reset() { *m = TableDescriptor_Se func (m *TableDescriptor_SequenceOpts) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_SequenceOpts) ProtoMessage() {} func (*TableDescriptor_SequenceOpts) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 5} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 5} } func (m *TableDescriptor_SequenceOpts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2191,7 +2198,7 @@ func (m *TableDescriptor_SequenceOpts_SequenceOwner) String() string { } func (*TableDescriptor_SequenceOpts_SequenceOwner) ProtoMessage() {} func (*TableDescriptor_SequenceOpts_SequenceOwner) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 5, 0} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 5, 0} } func (m *TableDescriptor_SequenceOpts_SequenceOwner) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2231,7 +2238,7 @@ func (m *TableDescriptor_Replacement) Reset() { *m = TableDescriptor_Rep func (m *TableDescriptor_Replacement) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_Replacement) ProtoMessage() {} func (*TableDescriptor_Replacement) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 6} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 6} } func (m *TableDescriptor_Replacement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2268,7 +2275,7 @@ func (m *TableDescriptor_GCDescriptorMutation) Reset() { *m = TableDescr func (m *TableDescriptor_GCDescriptorMutation) String() string { return proto.CompactTextString(m) } func (*TableDescriptor_GCDescriptorMutation) ProtoMessage() {} func (*TableDescriptor_GCDescriptorMutation) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{11, 7} + return fileDescriptor_structured_b4380afd7e608b0d, []int{11, 7} } func (m *TableDescriptor_GCDescriptorMutation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2307,7 +2314,7 @@ func (m *DatabaseDescriptor) Reset() { *m = DatabaseDescriptor{} } func (m *DatabaseDescriptor) String() string { return proto.CompactTextString(m) } func (*DatabaseDescriptor) ProtoMessage() {} func (*DatabaseDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{12} + return fileDescriptor_structured_b4380afd7e608b0d, []int{12} } func (m *DatabaseDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2365,7 +2372,7 @@ func (m *Descriptor) Reset() { *m = Descriptor{} } func (m *Descriptor) String() string { return proto.CompactTextString(m) } func (*Descriptor) ProtoMessage() {} func (*Descriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_structured_c64a18584f227d86, []int{13} + return fileDescriptor_structured_b4380afd7e608b0d, []int{13} } func (m *Descriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2717,6 +2724,9 @@ func (this *ColumnDescriptor) Equal(that interface{}) bool { } else if that1.ComputeExpr != nil { return false } + if this.LogicalColumnID != that1.LogicalColumnID { + return false + } return true } func (this *ColumnFamilyDescriptor) Equal(that interface{}) bool { @@ -4077,6 +4087,9 @@ func (m *ColumnDescriptor) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintStructured(dAtA, i, uint64(num)) } } + dAtA[i] = 0x68 + i++ + i = encodeVarintStructured(dAtA, i, uint64(m.LogicalColumnID)) return i, nil } @@ -5523,6 +5536,7 @@ func (m *ColumnDescriptor) Size() (n int) { n += 1 + sovStructured(uint64(e)) } } + n += 1 + sovStructured(uint64(m.LogicalColumnID)) return n } @@ -7088,6 +7102,25 @@ func (m *ColumnDescriptor) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field OwnsSequenceIds", wireType) } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LogicalColumnID", wireType) + } + m.LogicalColumnID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStructured + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LogicalColumnID |= (ColumnID(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipStructured(dAtA[iNdEx:]) @@ -12172,247 +12205,249 @@ var ( ) func init() { - proto.RegisterFile("sql/sqlbase/structured.proto", fileDescriptor_structured_c64a18584f227d86) -} - -var fileDescriptor_structured_c64a18584f227d86 = []byte{ - // 3804 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0xcb, 0x6f, 0x1b, 0xd7, - 0x7a, 0xd7, 0xf0, 0xcd, 0x6f, 0x48, 0x6a, 0x78, 0x24, 0xdb, 0xb4, 0xe2, 0x2b, 0xca, 0x74, 0x9c, - 0xe8, 0xde, 0x24, 0x92, 0x23, 0xf7, 0xe1, 0x9b, 0x16, 0x17, 0xe1, 0x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f, 0x0a, - 0x72, 0x24, 0x48, 0x4e, 0x57, 0xd1, 0xd2, 0x5b, 0x54, 0xd1, 0xef, 0x43, 0x86, 0x47, 0x06, 0x66, - 0x02, 0x45, 0x2e, 0x9d, 0x66, 0x51, 0x21, 0xfd, 0x15, 0x89, 0x08, 0x7c, 0xf6, 0x7f, 0x4d, 0x42, - 0x21, 0x1a, 0x44, 0x89, 0x1b, 0x31, 0xed, 0xbe, 0x4b, 0x23, 0x18, 0x9d, 0x3d, 0x19, 0x3c, 0x29, - 0x0a, 0x32, 0x09, 0xad, 0x23, 0xd3, 0xd6, 0xe8, 0x33, 0x56, 0xcc, 0xcc, 0x72, 0x23, 0xd3, 0xfe, - 0x92, 0x50, 0xe9, 0x10, 0xfd, 0x94, 0x0f, 0x49, 0xc6, 0x86, 0xe8, 0xa7, 0x6c, 0xc8, 0x0a, 0xcd, - 0x56, 0x5d, 0x9f, 0x96, 0x94, 0xc9, 0x48, 0xfe, 0xe9, 0xfa, 0x68, 0x15, 0xb2, 0x27, 0xa6, 0xeb, - 0x4f, 0x74, 0x8b, 0x56, 0x8f, 0x42, 0x21, 0x05, 0x11, 0xd9, 0x50, 0x0a, 0xd3, 0x86, 0x37, 0x36, - 0x76, 0xa9, 0x8a, 0xcb, 0x5b, 0xf5, 0xb7, 0xc8, 0x1b, 0xc2, 0x0f, 0x02, 0x24, 0x9c, 0xab, 0x17, - 0x25, 0xae, 0xfc, 0x8d, 0x04, 0xc5, 0xd8, 0x30, 0xd4, 0x81, 0x45, 0x3a, 0x71, 0xa4, 0x20, 0x64, - 0x77, 0x75, 0x3f, 0xf8, 0x13, 0x13, 0x61, 0xcf, 0xac, 0x08, 0x8b, 0x4e, 0x84, 0x65, 0xa0, 0xcf, - 0xa1, 0xc4, 0xa0, 0x82, 0xc7, 0xe9, 0xb8, 0xfa, 0x15, 0x28, 0x52, 0xfc, 0x85, 0xba, 0xe0, 0x84, - 0x34, 0x23, 0xfa, 0xee, 0xb6, 0x62, 0x83, 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 0x5d, 0x59, 0xb4, 0x5f, 0x3a, - 0x9d, 0x1d, 0x92, 0x9d, 0x73, 0x2a, 0x6f, 0x70, 0x65, 0x21, 0x3d, 0xb1, 0x4d, 0xc7, 0xfe, 0x89, - 0x1a, 0x7d, 0x5a, 0x10, 0xd1, 0x93, 0x5c, 0x05, 0xfd, 0xad, 0xfb, 0xd8, 0x60, 0xad, 0xb6, 0x17, - 0xf6, 0x49, 0x40, 0x90, 0x50, 0x09, 0x80, 0xf3, 0x4d, 0x7b, 0xa8, 0x24, 0xe8, 0x45, 0xba, 0xce, - 0x78, 0x4c, 0xbe, 0x92, 0x8d, 0x1f, 0x7f, 0xf7, 0x9f, 0xab, 0x0b, 0xdf, 0x5d, 0xac, 0x4a, 0xbf, - 0xbc, 0x58, 0x95, 0x7e, 0x75, 0xb1, 0x2a, 0xfd, 0xc7, 0xc5, 0xaa, 0xf4, 0x57, 0xdf, 0xaf, 0x2e, - 0xfc, 0xf2, 0xfb, 0xd5, 0x85, 0x5f, 0x7d, 0xbf, 0xba, 0xf0, 0x87, 0x59, 0xbe, 0xd8, 0xff, 0x0b, - 0x00, 0x00, 0xff, 0xff, 0x66, 0xd6, 0x54, 0xf0, 0xf0, 0x2b, 0x00, 0x00, + proto.RegisterFile("sql/sqlbase/structured.proto", fileDescriptor_structured_b4380afd7e608b0d) +} + +var fileDescriptor_structured_b4380afd7e608b0d = []byte{ + // 3832 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0xcb, 0x6f, 0x1b, 0x49, + 0x7a, 0x57, 0xf3, 0xcd, 0x8f, 0xaf, 0x66, 0x49, 0xb6, 0x69, 0x8d, 0x57, 0x94, 0xe9, 0xf1, 0x8c, + 0x76, 0x67, 0x46, 0xf2, 0xc8, 0x79, 0x78, 0x27, 0xc1, 0x62, 0x28, 0x92, 0xb2, 0x68, 0xc9, 0xa4, + 0xa6, 0x25,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 0x7d, + 0xbd, 0x2d, 0x18, 0x15, 0x99, 0x41, 0x05, 0x04, 0x0f, 0x1d, 0x40, 0x61, 0xc0, 0xb2, 0x2b, 0xf5, + 0x15, 0x3e, 0xa3, 0x79, 0x58, 0x61, 0xf3, 0x27, 0xf3, 0xe7, 0x61, 0x5b, 0x19, 0x72, 0x05, 0x35, + 0x49, 0x81, 0x41, 0x30, 0x88, 0x5e, 0x42, 0x29, 0x92, 0x3e, 0x1d, 0x9d, 0xd1, 0xe0, 0xfe, 0x76, + 0xb0, 0xc5, 0x10, 0x68, 0xeb, 0x0c, 0x7d, 0x01, 0x60, 0x06, 0x01, 0x80, 0xe6, 0x00, 0x85, 0xcd, + 0x8f, 0x6e, 0x10, 0x29, 0x84, 0x7f, 0x09, 0x41, 0xd0, 0x4b, 0x28, 0x87, 0x5f, 0x74, 0xb3, 0xc5, + 0x1b, 0x6f, 0x96, 0xa1, 0x96, 0x22, 0x38, 0x5b, 0x24, 0x0f, 0x5f, 0x22, 0xd9, 0x89, 0xe3, 0x99, + 0x3e, 0x8e, 0xaa, 0x41, 0x89, 0xaa, 0x41, 0xe3, 0xe2, 0xbc, 0x8e, 0x5a, 0x62, 0x7c, 0xb6, 0x2a, + 0x20, 0x7d, 0x6a, 0x9c, 0x29, 0x56, 0x4c, 0x81, 0x09, 0x62, 0x39, 0x54, 0xac, 0x83, 0x50, 0x85, + 0x2f, 0x29, 0x56, 0x44, 0xbd, 0x59, 0xe1, 0x54, 0x8c, 0xf9, 0x9e, 0xca, 0xdb, 0xfb, 0x9e, 0x18, + 0x10, 0xea, 0xf0, 0x7c, 0x54, 0xa6, 0x39, 0xfd, 0x47, 0x73, 0x2a, 0xe9, 0xe1, 0xd9, 0x58, 0x08, + 0x92, 0x25, 0xa2, 0x8f, 0x01, 0xe9, 0x2e, 0xd6, 0x7c, 0x6c, 0x90, 0x8c, 0xcf, 0x32, 0x75, 0xd3, + 0xb7, 0xce, 0x6a, 0xd5, 0x88, 0xdd, 0x57,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, 0x8a, 0x97, 0x18, 0x7e, 0x22, 0x39, 0xca, 0x4d, 0x06, 0xd1, 0x53, 0xc8, 0x8a, 0x02, + 0x33, 0x47, 0xd3, 0xba, 0x79, 0xcd, 0x57, 0x84, 0x62, 0xce, 0x8d, 0xb6, 0xa1, 0x6c, 0xe3, 0xd3, + 0x68, 0x3f, 0x24, 0x1f, 0x53, 0xf0, 0x62, 0x0f, 0x9f, 0xce, 0x6e, 0x86, 0x14, 0xed, 0x70, 0xc4, + 0x40, 0x5f, 0x40, 0x29, 0xe6, 0xa9, 0x68, 0x77, 0x72, 0x6e, 0x9f, 0x10, 0xe4, 0x5b, 0x11, 0x07, + 0x86, 0xb6, 0x21, 0x2b, 0x5c, 0x65, 0x81, 0x9e, 0xf1, 0x66, 0x60, 0x82, 0x19, 0x6d, 0x41, 0x89, + 0x1e, 0x31, 0xf0, 0xa0, 0xc5, 0x30, 0x83, 0xba, 0x38, 0xaf, 0x17, 0xc8, 0x09, 0x67, 0x74, 0x3d, + 0x0a, 0x76, 0x40, 0x37, 0xd0, 0x33, 0x80, 0xe0, 0x05, 0xcc, 0xa3, 0xfd, 0xb4, 0xab, 0x33, 0xe9, + 0x7d, 0x31, 0x31, 0xdc, 0x92, 0x12, 0xe1, 0x46, 0xcf, 0x21, 0x2f, 0x7c, 0x03, 0xcb, 0x71, 0xaf, + 0x36, 0xf5, 0xcb, 0x9e, 0x4a, 0xf8, 0xa7, 0x00, 0x81, 0xa4, 0x00, 0x16, 0xd6, 0x3c, 0xcc, 0x13, + 0xdd, 0x27, 0x73, 0xa6, 0x00, 0x07, 0xfa, 0x31, 0x1e, 0x69, 0xad, 0x63, 0x52, 0x44, 0xef, 0x11, + 0xfe, 0xad, 0x44, 0x4d, 0x52, 0x18, 0x14, 0xea, 0x81, 0x4c, 0x45, 0x16, 0x75, 0x7c, 0x32, 0x95, + 0xda, 0xfb, 0x5c, 0x6a, 0x65, 0x22, 0xb5, 0x2b, 0x9d, 0x1f, 0xd5, 0xa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x76, 0xbf, 0x91, 0x20, 0x1f, 0xfd, 0xfb, 0x54, 0x22, 0xd8, 0xe3, 0xec, 0x32, 0xe7, 0x2d, 0xdf, + 0xfa, 0xe2, 0xf7, 0x95, 0x9c, 0xff, 0xbe, 0xf8, 0x36, 0xff, 0x18, 0x0a, 0x91, 0x20, 0x39, 0x5d, + 0x45, 0x4b, 0x6f, 0x51, 0x45, 0xbf, 0x0f, 0x19, 0x1e, 0x19, 0x98, 0x09, 0x94, 0x38, 0x77, 0x9a, + 0x45, 0x85, 0xf4, 0x57, 0x24, 0x22, 0xf0, 0xd5, 0xff, 0x39, 0x09, 0xc5, 0x68, 0x10, 0x25, 0x6e, + 0xc4, 0xb4, 0x75, 0x97, 0x46, 0x30, 0xba, 0x7a, 0x32, 0x78, 0x52, 0x14, 0x64, 0x12, 0x5a, 0x47, + 0xa6, 0xad, 0xd2, 0x67, 0xac, 0x98, 0x99, 0xe5, 0x46, 0xa6, 0xfd, 0x25, 0xa1, 0xd2, 0x29, 0xda, + 0x29, 0x9f, 0x92, 0x8c, 0x4d, 0xd1, 0x4e, 0xd9, 0x94, 0x65, 0x9a, 0xad, 0xba, 0x3e, 0x2d, 0x29, + 0x93, 0x91, 0xfc, 0xd3, 0xf5, 0xd1, 0x0a, 0x64, 0x4f, 0x4c, 0xd7, 0x9f, 0x68, 0x16, 0xad, 0x1e, + 0x85, 0x42, 0x0a, 0x22, 0xb2, 0xa1, 0x1c, 0xa6, 0x0d, 0x6f, 0x6c, 0xec, 0x52, 0x15, 0x2f, 0x6c, + 0x36, 0xdf, 0x22, 0x6f, 0x08, 0x3f, 0x08, 0x90, 0x70, 0xae, 0x5e, 0x94, 0xb8, 0xfc, 0x57, 0x12, + 0x94, 0x62, 0xd3, 0x50, 0x17, 0x2a, 0x74, 0xe1, 0x48, 0x41, 0xc8, 0xee, 0xea, 0x7e, 0xf0, 0x47, + 0x28, 0x32, 0x3c, 0xb3, 0x22, 0x2c, 0x39, 0x91, 0x21, 0x03, 0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, 0x59, 0xf4, 0x7f, 0xa6, 0x57, 0xf7, 0x12, 0xa6, 0x2c, 0x6a, 0x67, 0x41, 0xfc, 0x0b, 0xf5, + 0x29, 0xe4, 0x0c, 0x7e, 0x6c, 0xae, 0x52, 0x57, 0x16, 0xed, 0x97, 0xa4, 0xb3, 0x43, 0xb2, 0x73, + 0x4e, 0xe5, 0x0d, 0xae, 0x2c, 0xa4, 0x27, 0xb6, 0xe9, 0xd8, 0x3f, 0x51, 0xa2, 0x4f, 0x0b, 0x22, + 0x7a, 0x92, 0xab, 0xa0, 0xbf, 0x35, 0x1f, 0x1b, 0xac, 0xd5, 0xf6, 0xc2, 0x3e, 0x09, 0x08, 0x12, + 0x2a, 0x03, 0xf0, 0x71, 0xd3, 0x1e, 0xca, 0x09, 0x7a, 0x91, 0xae, 0x33, 0x1e, 0x93, 0xaf, 0xe4, + 0xd6, 0x8f, 0xbf, 0xfd, 0xf7, 0x95, 0x85, 0x6f, 0x2f, 0x56, 0xa4, 0x5f, 0x5d, 0xac, 0x48, 0xbf, + 0xbe, 0x58, 0x91, 0xfe, 0xed, 0x62, 0x45, 0xfa, 0x8b, 0xef, 0x56, 0x16, 0x7e, 0xf5, 0xdd, 0xca, + 0xc2, 0xaf, 0xbf, 0x5b, 0x59, 0xf8, 0xfd, 0x2c, 0xdf, 0xec, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, + 0x2f, 0x16, 0x32, 0x63, 0x34, 0x2c, 0x00, 0x00, } diff --git a/pkg/sql/sqlbase/structured.proto b/pkg/sql/sqlbase/structured.proto index 4c5e72c708c2..9b4b0cc045c5 100644 --- a/pkg/sql/sqlbase/structured.proto +++ b/pkg/sql/sqlbase/structured.proto @@ -130,6 +130,14 @@ message ColumnDescriptor { // Expression to use to compute the value of this column if this is a // computed column. optional string compute_expr = 11; + // LogicalColumnID must be accessed through the accessor, since it is set + // lazily, it is incorrect to access it directly. + // LogicalColumnID represents a column's number in catalog tables. + // This only differs from ID when the Column order is swapped or + // the ColumnDescriptor must be remade while remaining visual ordering. + // This does not exist in TableDescriptors pre 20.2. + optional uint32 logical_id = 13 [(gogoproto.nullable) = false, + (gogoproto.customname) = "LogicalColumnID", (gogoproto.casttype) = "ColumnID"]; } // ColumnFamilyDescriptor is set of columns stored together in one kv entry. diff --git a/pkg/sql/sqlbase/structured_test.go b/pkg/sql/sqlbase/structured_test.go index 687420c28842..cb5afad13bca 100644 --- a/pkg/sql/sqlbase/structured_test.go +++ b/pkg/sql/sqlbase/structured_test.go @@ -1410,3 +1410,24 @@ func TestSQLString(t *testing.T) { t.Errorf("Expected '%s', but got '%s'", expected, got) } } + +func TestLogicalColumnID(t *testing.T) { + tests := []struct { + desc TableDescriptor + expected ColumnID + }{ + {TableDescriptor{Columns: []ColumnDescriptor{{ID: 1, LogicalColumnID: 1}}}, 1}, + // If LogicalColumnID is not explicitly set, it should be lazy loaded as ID. + {TableDescriptor{Columns: []ColumnDescriptor{{ID: 2}}}, 2}, + } + + for i := range tests { + actual := tests[i].desc.Columns[0].GetLogicalColumnID() + expected := tests[i].expected + + if expected != actual { + t.Fatalf("Expected LogicalColumnID to be %d, got %d.", expected, actual) + } + } + +} diff --git a/pkg/storage/pebble_mvcc_scanner.go b/pkg/storage/pebble_mvcc_scanner.go index 1f2627efce96..331109d4b5a5 100644 --- a/pkg/storage/pebble_mvcc_scanner.go +++ b/pkg/storage/pebble_mvcc_scanner.go @@ -409,6 +409,14 @@ func (p *pebbleMVCCScanner) getAndAdvance() bool { // history that has a sequence number equal to or less than the read // sequence, read that value. if p.getFromIntentHistory() { + if p.targetBytes > 0 && p.results.bytes >= p.targetBytes { + // When the target bytes are met or exceeded, stop producing more + // keys. We implement this by reducing maxKeys to the current + // number of keys. + // + // TODO(bilal): see if this can be implemented more transparently. + p.maxKeys = p.results.count + } if p.maxKeys > 0 && p.results.count == p.maxKeys { return false } diff --git a/pkg/storage/row_counter.go b/pkg/storage/row_counter.go index e56024aeb7d2..814c337a6259 100644 --- a/pkg/storage/row_counter.go +++ b/pkg/storage/row_counter.go @@ -51,7 +51,11 @@ func (r *RowCounter) Count(key roachpb.Key) error { r.prev = append(r.prev[:0], row...) - _, tableID, indexID, err := keys.TODOSQLCodec.DecodeIndexPrefix(row) + rem, _, err := keys.DecodeTenantPrefix(row) + if err != nil { + return err + } + _, tableID, indexID, err := keys.DecodeTableIDIndexID(rem) if err != nil { return err } diff --git a/pkg/storage/testdata/mvcc_histories/max_keys b/pkg/storage/testdata/mvcc_histories/max_keys index d60598152680..3ce655dede5f 100644 --- a/pkg/storage/testdata/mvcc_histories/max_keys +++ b/pkg/storage/testdata/mvcc_histories/max_keys @@ -86,3 +86,114 @@ scan: "e" -> /BYTES/val-e @0.000000001,0 scan: "e" -> /BYTES/val-e @0.000000001,0 scan: "c" -> /BYTES/val-c @0.000000001,0 scan: "a" -> /BYTES/val-a @0.000000001,0 + +# Regression test for #46652: Test appropriate termination when the MaxKeys-th +# key is in the intent history. + +run ok +with t=A ts=11,0 max=3 + txn_begin + txn_step seq=10 + put k=k v=a + put k=l v=a + put k=m v=a + put k=n v=a + txn_step seq=20 + put k=k v=b + put k=l v=b + put k=m v=b + put k=n v=b + txn_step seq=30 + put k=k v=c + put k=l v=c + put k=m v=c + put k=n v=c + txn_step seq=20 + scan k=k end=o + scan k=k end=o reverse=true +---- +scan: "k" -> /BYTES/b @0,0 +scan: "l" -> /BYTES/b @0,0 +scan: "m" -> /BYTES/b @0,0 +scan: resume span ["n","o") +scan: "n" -> /BYTES/b @0,0 +scan: "m" -> /BYTES/b @0,0 +scan: "l" -> /BYTES/b @0,0 +scan: resume span ["k","k\x00") +>> at end: +txn: "A" meta={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=20} lock=true stat=PENDING rts=0.000000011,0 wto=false max=0,0 +data: "a"/0.000000001,0 -> /BYTES/val-a +data: "aa"/0.000000002,0 -> / +data: "aa"/0.000000001,0 -> /BYTES/val-aa +data: "c"/0.000000001,0 -> /BYTES/val-c +data: "e"/0.000000001,0 -> /BYTES/val-e +meta: "k"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "k"/0.000000011,0 -> /BYTES/c +meta: "l"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "l"/0.000000011,0 -> /BYTES/c +meta: "m"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "m"/0.000000011,0 -> /BYTES/c +meta: "n"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "n"/0.000000011,0 -> /BYTES/c + +run ok +with t=A ts=11,0 max=3 + txn_step seq=30 + resolve_intent k=k status=COMMITTED + resolve_intent k=l status=COMMITTED + resolve_intent k=m status=COMMITTED + resolve_intent k=n status=COMMITTED +---- +>> at end: +txn: "A" meta={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} lock=true stat=PENDING rts=0.000000011,0 wto=false max=0,0 +data: "a"/0.000000001,0 -> /BYTES/val-a +data: "aa"/0.000000002,0 -> / +data: "aa"/0.000000001,0 -> /BYTES/val-aa +data: "c"/0.000000001,0 -> /BYTES/val-c +data: "e"/0.000000001,0 -> /BYTES/val-e +data: "k"/0.000000011,0 -> /BYTES/c +data: "l"/0.000000011,0 -> /BYTES/c +data: "m"/0.000000011,0 -> /BYTES/c +data: "n"/0.000000011,0 -> /BYTES/c + +# Same case as above, except with a committed value at the key after MaxKeys. + +run ok +with t=B ts=12,0 max=3 + txn_begin + txn_step seq=10 + put k=k v=a + put k=l v=a + put k=m v=a + txn_step seq=20 + put k=k v=b + put k=l v=b + put k=m v=b + txn_step seq=30 + put k=k v=c + put k=l v=c + put k=m v=c + txn_step seq=20 + scan k=k end=o +---- +scan: "k" -> /BYTES/b @0,0 +scan: "l" -> /BYTES/b @0,0 +scan: "m" -> /BYTES/b @0,0 +scan: resume span ["n","o") +>> at end: +txn: "B" meta={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000012,0 min=0,0 seq=20} lock=true stat=PENDING rts=0.000000012,0 wto=false max=0,0 +data: "a"/0.000000001,0 -> /BYTES/val-a +data: "aa"/0.000000002,0 -> / +data: "aa"/0.000000001,0 -> /BYTES/val-aa +data: "c"/0.000000001,0 -> /BYTES/val-c +data: "e"/0.000000001,0 -> /BYTES/val-e +meta: "k"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000012,0 min=0,0 seq=30} ts=0.000000012,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "k"/0.000000012,0 -> /BYTES/c +data: "k"/0.000000011,0 -> /BYTES/c +meta: "l"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000012,0 min=0,0 seq=30} ts=0.000000012,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "l"/0.000000012,0 -> /BYTES/c +data: "l"/0.000000011,0 -> /BYTES/c +meta: "m"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000012,0 min=0,0 seq=30} ts=0.000000012,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "m"/0.000000012,0 -> /BYTES/c +data: "m"/0.000000011,0 -> /BYTES/c +data: "n"/0.000000011,0 -> /BYTES/c diff --git a/pkg/storage/testdata/mvcc_histories/target_bytes b/pkg/storage/testdata/mvcc_histories/target_bytes index e2048338aa9e..71377fd432c0 100644 --- a/pkg/storage/testdata/mvcc_histories/target_bytes +++ b/pkg/storage/testdata/mvcc_histories/target_bytes @@ -246,3 +246,54 @@ scan: "c" -> /BYTES/ghijkllkjihg @0.000000123,45 scan: "aa" -> / @0.000000250,1 scan: "a" -> /BYTES/abcdef @0.000000123,45 scan: 98 bytes (target 65) + +# Regression test for a bug simiar to #46652: Test appropriate termination when +# the TargetBytes-th kv pair is in the intent history. + +run ok +with t=A ts=11,0 targetbytes=32 + txn_begin + txn_step seq=10 + put k=k v=a + put k=l v=a + put k=m v=a + put k=n v=a + txn_step seq=20 + put k=k v=b + put k=l v=b + put k=m v=b + put k=n v=b + txn_step seq=30 + put k=k v=c + put k=l v=c + put k=m v=c + put k=n v=c + txn_step seq=20 + scan k=k end=o + scan k=k end=o reverse=true +---- +scan: "k" -> /BYTES/b @0,0 +scan: "l" -> /BYTES/b @0,0 +scan: resume span ["m","o") +scan: 32 bytes (target 32) +scan: "n" -> /BYTES/b @0,0 +scan: "m" -> /BYTES/b @0,0 +scan: resume span ["k","l\x00") +scan: 32 bytes (target 32) +>> at end: +txn: "A" meta={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=20} lock=true stat=PENDING rts=0.000000011,0 wto=false max=0,0 +data: "a"/0.000000123,45 -> /BYTES/abcdef +data: "a"/0.000000001,0 -> /BYTES/nevergoingtobeseen +data: "aa"/0.000000250,1 -> / +data: "aa"/0.000000001,0 -> /BYTES/willbetombstoned +data: "c"/0.000000123,45 -> /BYTES/ghijkllkjihg +data: "e"/0.000000123,45 -> /BYTES/mnopqr +data: "e"/0.000000001,0 -> /BYTES/sameasabove +meta: "k"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "k"/0.000000011,0 -> /BYTES/c +meta: "l"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "l"/0.000000011,0 -> /BYTES/c +meta: "m"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "m"/0.000000011,0 -> /BYTES/c +meta: "n"/0,0 -> txn={id=00000000 key=/Min pri=0.00000000 epo=0 ts=0.000000011,0 min=0,0 seq=30} ts=0.000000011,0 del=false klen=12 vlen=6 ih={{10 /BYTES/a}{20 /BYTES/b}} +data: "n"/0.000000011,0 -> /BYTES/c