List:Internals« Previous MessageNext Message »
From:Vasil Dimov Date:June 11 2008 7:50pm
Subject:Re: Plans about implementing engine parameters for tables
View as plain text  
On Wed, Jun 11, 2008 at 22:27:18 +0300, Sanja Byelkin wrote:
> On Wed, Jun 11, 2008 at 09:55:59PM +0300, Vasil Dimov wrote:
> [skip]
> > Hi,
> > 
> > What if the engine wants only INT fields to get FOO='bar', because
> > FOO does not make sense for VARCHAR fields (for example)?
> > 
> > What will happen if the engine specifies A1= and A2= as possible
> > table options but the user only creates the table with A1='x'? Will A2
> > be passed to the engine with the default value? If yes, then how would
> > the engine understand whether the user has specied
> > A2='the default value' or has not specied A2= at all?
> 
> If the parameter is legal then it does not matter was that default value
> assigned by user or as default, but I with connection to your previous
> question about parameters valid only to specific type (Also it can be
> check of allowed combination of parameters) it has sense to
> pass information to engine about:
> 1. Was that value assigned by user or just assigned as default
[...]

Yes, exactly. Just to make sure we are on the same line:

this is about type-specific parameters, if engine wants to have

x INT PARAMETER_ONLY_FOR_INTS='foo',
y VARCHAR PARAMETER_ONLY_FOR_VARCHARS='bar',

then it would have to specify PARAMETER_ONLY_FOR_INTS= and
PARAMETER_ONLY_FOR_VARCHARS= to MySQL and things like

x INT PARAMETER_ONLY_FOR_VARCHARS='bar'

would be allowed by the MySQL parser, so the engine must be able to
catch this and generate an error or whatever action is appropriate.
So engine must be able to understand whether a parameter was actually
supplied by the user or not.

Or maybe add some bitmap in the my-getopt-like struct that would
specify the allowed SQL types for the column for which the parameter was
specified?

-- 
Vasil Dimov
moc.elcaro@stripped        Software Developer @ Oracle/Innobase Oy
gro.DSBeerF@dv                Committer @ FreeBSD.org
gro.d5v@dv                    Home @ Sofia, Bulgaria

Attachment: [application/pgp-signature]
Thread
Plans about implementing engine parameters for tablesSanja Byelkin6 Jun
  • Re: Plans about implementing engine parameters for tablesSergei Golubchik6 Jun
    • Re: Plans about implementing engine parameters for tablesSanja Byelkin6 Jun
      • Re: Plans about implementing engine parameters for tablesPaul DuBois6 Jun
        • Re: Plans about implementing engine parameters for tablesSanja Byelkin7 Jun
  • Re: Plans about implementing engine parameters for tablesPaul McCullagh7 Jun
  • Re: Plans about implementing engine parameters for tablesVasil Dimov11 Jun
    • Re: Plans about implementing engine parameters for tablesSanja Byelkin11 Jun
      • Re: Plans about implementing engine parameters for tablesVasil Dimov11 Jun
        • Re: Plans about implementing engine parameters for tablesSanja Byelkin11 Jun
          • Re: Plans about implementing engine parameters for tablesVasil Dimov16 Jun